<html>
<head><meta charset="utf-8"><title>non fatal cycle errors · t-compiler · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/index.html">t-compiler</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/non.20fatal.20cycle.20errors.html">non fatal cycle errors</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="203006635"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/non%20fatal%20cycle%20errors/near/203006635" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/non.20fatal.20cycle.20errors.html#203006635">(Jul 06 2020 at 15:54)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/issues/74101">https://github.com/rust-lang/rust/issues/74101</a> ends up with multiple distinct cycle errors.</p>
<p>This leads me to believe that we are somehow able to recover from cycle errors,<br>
which is somewhat surprising to me. How are we able to do so?</p>



<a name="203006721"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/non%20fatal%20cycle%20errors/near/203006721" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/non.20fatal.20cycle.20errors.html#203006721">(Jul 06 2020 at 15:55)</a>:</h4>
<p>Not sure, but MIR inlining needs that too</p>



<a name="203009930"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/non%20fatal%20cycle%20errors/near/203009930" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/non.20fatal.20cycle.20errors.html#203009930">(Jul 06 2020 at 16:17)</a>:</h4>
<p><span class="user-mention" data-user-id="124288">@oli</span>  is working on side-stepping query cycles for the MIR inliner <a href="https://github.com/rust-lang/rust/pull/68828">https://github.com/rust-lang/rust/pull/68828</a>.</p>
<p>(Just in case the general idea is helpful for <a href="https://github.com/rust-lang/rust/issues/74101">#74101</a>)</p>



<a name="203012188"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/non%20fatal%20cycle%20errors/near/203012188" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/non.20fatal.20cycle.20errors.html#203012188">(Jul 06 2020 at 16:37)</a>:</h4>
<p>That PR is interesting, haven't looked into <a href="https://github.com/rust-lang/rust/issues/74101">#74101</a> so I can't say what has to be done there yet.</p>
<p>After reading that issue it seems like all query cycles are fatal atm <span aria-label="thinking" class="emoji emoji-1f914" role="img" title="thinking">:thinking:</span> So the reason we get multiple "error[E0391]: cycle detected" is probably something else</p>



<a name="203045742"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/non%20fatal%20cycle%20errors/near/203045742" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/non.20fatal.20cycle.20errors.html#203045742">(Jul 06 2020 at 21:59)</a>:</h4>
<p>In the context of salsa, I'm working on a proposal to integrate the chalk recursive solver that would extend salsa with the ability to handle some kinds of cycles without errors at all</p>



<a name="203047608"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/non%20fatal%20cycle%20errors/near/203047608" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/non.20fatal.20cycle.20errors.html#203047608">(Jul 06 2020 at 22:20)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> does it involve not caching the intermediary products within the cycle? does it involve fixpoint?</p>



<a name="203047664"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/non%20fatal%20cycle%20errors/near/203047664" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/non.20fatal.20cycle.20errors.html#203047664">(Jul 06 2020 at 22:21)</a>:</h4>
<p>(<code>cyclotron</code> does both and I still don't feel 100% comfortable claiming that "gives you soundness". it works for some usecases like parsing, at least for a context-free grammar, but I don't know what the full set of limitations should be)</p>



<a name="203047779"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/non%20fatal%20cycle%20errors/near/203047779" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/non.20fatal.20cycle.20errors.html#203047779">(Jul 06 2020 at 22:23)</a>:</h4>
<p>I guess the problem is that you have to have some sort of "empty result" to start the fixpoint from, and where the cycle was entered is what will start out as empty, so you could still have sensitivity to query order</p>



<a name="203047940"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/non%20fatal%20cycle%20errors/near/203047940" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/non.20fatal.20cycle.20errors.html#203047940">(Jul 06 2020 at 22:25)</a>:</h4>
<p>like an easy way to visualize this is to imagine N queries that call eachother in a loop and all return <code>IndexSet&lt;usize&gt;</code> or something, each inserting their number (one of each 0..N) - when the <code>IndexSet</code> reaches <code>N</code> elements, the fixpoint finishes, since further inserts will not change the set, but the iteration order (or even just the first element in the set) will reveal which query was first called</p>



<a name="203048048"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/non%20fatal%20cycle%20errors/near/203048048" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/non.20fatal.20cycle.20errors.html#203048048">(Jul 06 2020 at 22:26)</a>:</h4>
<p>for Chalk the soundness is part of the solver design, but for arbitrary user code it's more subtle</p>



<a name="203054307"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/non%20fatal%20cycle%20errors/near/203054307" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/non.20fatal.20cycle.20errors.html#203054307">(Jul 06 2020 at 23:49)</a>:</h4>
<p><span class="user-mention" data-user-id="119009">@eddyb</span> <a href="https://hackmd.io/FCrUiW27TnKw3MTvRtfPjQ">this is a description of the proposal</a>: in short it has fixed point semantics, yes. It is not however meant to imply that it is universally applicable. It only works some of the time, I agree. It happens to address what chalk needs well enough.</p>



<a name="203054355"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/non%20fatal%20cycle%20errors/near/203054355" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/non.20fatal.20cycle.20errors.html#203054355">(Jul 06 2020 at 23:50)</a>:</h4>
<p>at least so long as we don't need to handle negative cycles...</p>



<a name="203054365"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/non%20fatal%20cycle%20errors/near/203054365" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/non.20fatal.20cycle.20errors.html#203054365">(Jul 06 2020 at 23:50)</a>:</h4>
<p>...which I <em>think</em> we don't. If we did, it's possible to do so, but it makes the proposal significantly more complex.</p>



<a name="203054372"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/non%20fatal%20cycle%20errors/near/203054372" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/non.20fatal.20cycle.20errors.html#203054372">(Jul 06 2020 at 23:50)</a>:</h4>
<p>I'm not sure what cyclotron is :)</p>



<a name="203054383"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/non%20fatal%20cycle%20errors/near/203054383" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/non.20fatal.20cycle.20errors.html#203054383">(Jul 06 2020 at 23:50)</a>:</h4>
<p>it's my implementation of a somewhat inefficient way to do pretty much this :P</p>



<a name="203054401"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/non%20fatal%20cycle%20errors/near/203054401" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/non.20fatal.20cycle.20errors.html#203054401">(Jul 06 2020 at 23:51)</a>:</h4>
<p>ok :)</p>



<a name="203054412"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/non%20fatal%20cycle%20errors/near/203054412" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/non.20fatal.20cycle.20errors.html#203054412">(Jul 06 2020 at 23:51)</a>:</h4>
<p>chalk's recursive solver is <a href="http://rust-lang.github.io/chalk/book/recursive/search_graph.html">documented here</a>...</p>



<a name="203054457"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/non%20fatal%20cycle%20errors/near/203054457" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/non.20fatal.20cycle.20errors.html#203054457">(Jul 06 2020 at 23:52)</a>:</h4>
<p>in the case of cycles, it does some amount of caching, but only within a particular iteration</p>



<a name="203054467"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/non%20fatal%20cycle%20errors/near/203054467" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/non.20fatal.20cycle.20errors.html#203054467">(Jul 06 2020 at 23:52)</a>:</h4>
<p>though once the cycle is complete (fixed point is reached),</p>



<a name="203054470"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/non%20fatal%20cycle%20errors/near/203054470" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/non.20fatal.20cycle.20errors.html#203054470">(Jul 06 2020 at 23:52)</a>:</h4>
<p>it adds all the intermediate values into the final cache</p>



<a name="203054472"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/non%20fatal%20cycle%20errors/near/203054472" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/non.20fatal.20cycle.20errors.html#203054472">(Jul 06 2020 at 23:52)</a>:</h4>
<p>this is basically the model I intended to port to salsa</p>



<a name="203054492"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/non%20fatal%20cycle%20errors/near/203054492" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/non.20fatal.20cycle.20errors.html#203054492">(Jul 06 2020 at 23:52)</a>:</h4>
<p>it doesn't work for negative goals or other "non-monotonic" elements in a cycle</p>



<a name="203054512"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/non%20fatal%20cycle%20errors/near/203054512" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/non.20fatal.20cycle.20errors.html#203054512">(Jul 06 2020 at 23:53)</a>:</h4>
<p>(by negative goal, I mean trying to prove <code>X</code> is true if <code>not { Y }</code>, as could maybe occur with specialization)</p>



<a name="203054525"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/non%20fatal%20cycle%20errors/near/203054525" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/non.20fatal.20cycle.20errors.html#203054525">(Jul 06 2020 at 23:53)</a>:</h4>
<p>the word "graph" suggests to me it's closer to an algorithm like GLL (which can suspend multiple "callers" per "query" and resume them all on (every) success)</p>



<a name="203054539"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/non%20fatal%20cycle%20errors/near/203054539" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/non.20fatal.20cycle.20errors.html#203054539">(Jul 06 2020 at 23:53)</a>:</h4>
<p>but I'm guessing <code>salsa</code> can't do anything like that and has to actually keep executing the cycle until fixpoint, right?</p>



<a name="203054637"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/non%20fatal%20cycle%20errors/near/203054637" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/non.20fatal.20cycle.20errors.html#203054637">(Jul 06 2020 at 23:55)</a>:</h4>
<p>/me is amused by algorithmic convergence, and how parsing and trait solving could share a computational model</p>



<a name="203054709"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/non%20fatal%20cycle%20errors/near/203054709" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/non.20fatal.20cycle.20errors.html#203054709">(Jul 06 2020 at 23:56)</a>:</h4>
<p>anyway, I didn't have to rant that much, but yeah, monotonic fixpoints is what I was thinking of, neat</p>



<a name="203054861"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/non%20fatal%20cycle%20errors/near/203054861" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/non.20fatal.20cycle.20errors.html#203054861">(Jul 06 2020 at 23:59)</a>:</h4>
<p><span class="user-mention silent" data-user-id="119009">eddyb</span> <a href="#narrow/stream/131828-t-compiler/topic/non.20fatal.20cycle.20errors/near/203054539">said</a>:</p>
<blockquote>
<p>but I'm guessing <code>salsa</code> can't do anything like that and has to actually keep executing the cycle until fixpoint, right?</p>
</blockquote>
<p>yes, the SLG solver in chalk does an approach more like that, but right now I'm thinking it has "less promise" than the recursive one, sadly</p>



<a name="203056488"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/non%20fatal%20cycle%20errors/near/203056488" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/non.20fatal.20cycle.20errors.html#203056488">(Jul 07 2020 at 00:27)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116009">nikomatsakis</span> <a href="#narrow/stream/131828-t-compiler/topic/non.20fatal.20cycle.20errors/near/203054861">said</a>:</p>
<blockquote>
<p><span class="user-mention silent" data-user-id="119009">eddyb</span> <a href="#narrow/stream/131828-t-compiler/topic/non.20fatal.20cycle.20errors/near/203054539">said</a>:</p>
<blockquote>
<p>but I'm guessing <code>salsa</code> can't do anything like that and has to actually keep executing the cycle until fixpoint, right?</p>
</blockquote>
<p>yes, the SLG solver in chalk does an approach more like that, but right now I'm thinking it has "less promise" than the recursive one, sadly</p>
</blockquote>
<p>:(</p>



<a name="204312643"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/non%20fatal%20cycle%20errors/near/204312643" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/non.20fatal.20cycle.20errors.html#204312643">(Jul 18 2020 at 18:41)</a>:</h4>
<p>okay so <a href="https://github.com/rust-lang/rust/issues/74199">https://github.com/rust-lang/rust/issues/74199</a> also continues after a cycle error and hits an ICE. How does this happen?</p>



<a name="204312945"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/non%20fatal%20cycle%20errors/near/204312945" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/non.20fatal.20cycle.20errors.html#204312945">(Jul 18 2020 at 18:48)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/blob/e59b08e62ea691916d2f063cac5aab4634128022/src/librustc_middle/ty/query/plumbing.rs#L173">https://github.com/rust-lang/rust/blob/e59b08e62ea691916d2f063cac5aab4634128022/src/librustc_middle/ty/query/plumbing.rs#L173</a><br>
<a href="https://github.com/rust-lang/rust/blob/d9e8d6290745a65025a3e082aea72fbe372292c6/src/librustc_middle/ty/query/values.rs#L18">https://github.com/rust-lang/rust/blob/d9e8d6290745a65025a3e082aea72fbe372292c6/src/librustc_middle/ty/query/values.rs#L18</a></p>
<p>It returns an <code>ty::Error</code> from the query after emitting the error diagnostic.</p>



<a name="204313090"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/non%20fatal%20cycle%20errors/near/204313090" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/non.20fatal.20cycle.20errors.html#204313090">(Jul 18 2020 at 18:52)</a>:</h4>
<p>thanks </p>
<p>idk what I think about this <span aria-label="unamused" class="emoji emoji-1f612" role="img" title="unamused">:unamused:</span> but at least it now makes sense why this is happening <span aria-label="thumbs up" class="emoji emoji-1f44d" role="img" title="thumbs up">:thumbs_up:</span></p>



<a name="204313183"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/non%20fatal%20cycle%20errors/near/204313183" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/non.20fatal.20cycle.20errors.html#204313183">(Jul 18 2020 at 18:55)</a>:</h4>
<div class="codehilite"><pre><span></span><code><span class="c1">// The result type of each query must implement `Clone`, and additionally</span>
<span class="c1">// `ty::query::values::Value`, which produces an appropriate placeholder</span>
<span class="c1">// (error) value if the query resulted in a query cycle.</span>
<span class="c1">// Queries marked with `fatal_cycle` do not need the latter implementation,</span>
<span class="c1">// as they will raise an fatal error on query cycles instead</span>
</code></pre></div>



<a name="204313297"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/non%20fatal%20cycle%20errors/near/204313297" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/non.20fatal.20cycle.20errors.html#204313297">(Jul 18 2020 at 18:59)</a>:</h4>
<p>Are these queries then always marked as <code>red</code>?</p>



<a name="204313715"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/non%20fatal%20cycle%20errors/near/204313715" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/non.20fatal.20cycle.20errors.html#204313715">(Jul 18 2020 at 19:10)</a>:</h4>
<p>Does it matter much? The incremental caches will not be written when there are any errors.</p>



<a name="204313772"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/non%20fatal%20cycle%20errors/near/204313772" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/non.20fatal.20cycle.20errors.html#204313772">(Jul 18 2020 at 19:13)</a>:</h4>
<p><span class="user-mention silent" data-user-id="133247">bjorn3</span> <a href="#narrow/stream/131828-t-compiler/topic/non.20fatal.20cycle.20errors/near/204313715">said</a>:</p>
<blockquote>
<p>Does it matter much? The incremental caches will not be written when there are any errors.</p>
</blockquote>
<p>results in the same thing <span aria-label="laughing" class="emoji emoji-1f606" role="img" title="laughing">:laughing:</span> caching queries which are part of a cycle error would end up being unsound afaik</p>



<a name="204313777"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/non%20fatal%20cycle%20errors/near/204313777" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/non.20fatal.20cycle.20errors.html#204313777">(Jul 18 2020 at 19:13)</a>:</h4>
<p>so that seems fine to me</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>